<?php

 require_once(FRAMEWORK_DIR."/libraries/phputf8/utf8.php");
 require_once(FRAMEWORK_DIR."/libraries/phputf8/ucfirst.php");
	NTable::addIncludePath(FRAMEWORK_DIR."/libraries/neocasta/taxonomy/tables");
class NTaxonomy{


 	function insert_term($term,$taxonomy){
	$db=NFactory::getDBO();
	//$args = NWPFunctions::wp_parse_args($args, $defaults);
	$args['name'] = $term;
	$args['taxonomy'] = $taxonomy;
	extract($args, EXTR_SKIP);
	if ( false === $db->insertObject( "#__terms", compact( 'name' )))
			return  NError::raiseError('db_insert_error', NText::_('Could not insert term into the database'), $db->getLastError());
		$term_id = (int) $db->get_insert_id();
	}



}
?>
